import { createApp } from 'vue'
import './style.css'
import App from './App.vue'

// 导入 router
import router from "./router";
import pinia from "./store";

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// svg-icons 注册导入
import 'virtual:svg-icons-register'

import SvgIcon from './components/SvgIcon/Index.vue'

const app = createApp(App)
app.use(router)
app.use(pinia)

// 注册所有图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(ElementPlus)
app.component('svg-icon', SvgIcon)

app.mount('#app')
